import request from '@/utils/request'

// 获取 历史用药信息
export function getList(data) {
    return request({
        url: '/api-jst/recode/selectallHistorydrug',
        method: 'get',
        params: data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}

// 获取 项 get
export function getItem(data) {
    return request({
        url: '/api-jst/jst/commons/dictionary',
        method: 'get',
        params: data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}

// 获取 项 post
export function queryItem(data) {
    return request({
        url: '/api-jst/jst/base/getPhaItemListAll',
        method: 'post',
        data: data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}

// 获取 频次 post
export function queryFrequencies(data) {
    return request({
        url: '/api-fol/comCodeLists/rcode',
        method: 'post',
        data: data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
    })
}

// 获取 适应症 postselectDiseaseHistories
export function queryDiseases(data) {
  return request({
    url: '/api-fol/comCodeLists/rcode',
    method: 'post',
    data: data,
    baseURL: process.env.VUE_APP_BASE_API_DATA_BRANCH
  })
}

// 获取 干预分类 get
export function getAdjustment(data){
    return request({
        url:'/api-jst/userId/medicdicnary',
        method:'get',
        params:data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}

// 新增 用药 post
export function addDrug(data){
    return request({
        url: '/api-jst/recode/insert',
        method: 'post',
        data: data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}


// 修改 干预但不修改剂量 post
export function editDrug(data){
    return request({
        url:'/api-jst/recode/updateordermark',
        method:'post',
        data:data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}

// 停止 用药 post
export function stopDrug(data){
    return request({
        url:'/api-jst/recode/updateStopDrugs',
        method:'post',
        data:data,
        baseURL: process.env.VUE_APP_BASE_API_DATA_TABLE
    })
}
